<script setup>
import { artGetChannelsService } from "@/api/article";
import { ref } from "vue";

defineProps({
  modelValue: {
    type: [Number, String],
  }
})

const emit = defineEmits(['update:modelValue'])

const channelList = ref([]);
const GetchannelList = async () => {
  const res = await artGetChannelsService();
  channelList.value = res.data.data;
}
GetchannelList();
</script>
<template>

  <el-select :model-value="modelValue" @update:modelValue="emit('update:modelValue', $event)">

    <el-option v-for="channel in channelList" :key="channel.id" :label="channel.cate_name"
      :value="channel.id"></el-option>

  </el-select>
</template>